.class public Lcom/adview/adapters/AduuAdapter;
.super Lcom/adview/adapters/AdViewAdapter;
.source "AduuAdapter.java"

# interfaces
.implements Lcn/aduu/adsdk/AdViewListener;


# instance fields
.field private adView:Lcn/aduu/adsdk/AdView;


# direct methods
.method public constructor <init>(Lcom/adview/AdViewLayout;Lcom/adview/obj/Ration;)V
    .locals 1
    .parameter "adViewLayout"
    .parameter "ration"

    .prologue
    .line 23
    invoke-direct {p0, p1, p2}, Lcom/adview/adapters/AdViewAdapter;-><init>(Lcom/adview/AdViewLayout;Lcom/adview/obj/Ration;)V

    .line 20
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/adview/adapters/AduuAdapter;->adView:Lcn/aduu/adsdk/AdView;

    .line 25
    return-void
.end method


# virtual methods
.method public handle()V
    .locals 9

    .prologue
    const/16 v5, 0x3d

    const/4 v4, 0x2

    const/16 v2, -0x9

    const/4 v3, 0x0

    .line 32
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v0

    sget-object v1, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v0, v1, :cond_0

    .line 33
    const-string v0, "AdView SDK v1.7.0"

    const-string v1, "Into Aduu"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 34
    :cond_0
    iget-object v0, p0, Lcom/adview/adapters/AduuAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Lcom/adview/AdViewLayout;

    .line 35
    .local v8, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v8, :cond_2

    .line 54
    :cond_1
    :goto_0
    return-void

    .line 39
    :cond_2
    iget-object v0, v8, Lcom/adview/AdViewLayout;->activityReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Landroid/app/Activity;

    .line 40
    .local v7, activity:Landroid/app/Activity;
    if-eqz v7, :cond_1

    .line 43
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v0

    sget-object v1, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v0, v1, :cond_3

    .line 44
    iget-object v0, p0, Lcom/adview/adapters/AduuAdapter;->ration:Lcom/adview/obj/Ration;

    iget-object v0, v0, Lcom/adview/obj/Ration;->key:Ljava/lang/String;

    iget-object v1, p0, Lcom/adview/adapters/AduuAdapter;->ration:Lcom/adview/obj/Ration;

    iget-object v1, v1, Lcom/adview/obj/Ration;->key2:Ljava/lang/String;

    const/4 v6, 0x1

    invoke-static/range {v0 .. v6}, Lcn/aduu/adsdk/AdManager;->init(Ljava/lang/String;Ljava/lang/String;IIIIZ)V

    .line 47
    :goto_1
    new-instance v1, Lcn/aduu/adsdk/AdView;

    invoke-virtual {v8}, Lcom/adview/AdViewLayout;->getContext()Landroid/content/Context;

    move-result-object v0

    check-cast v0, Landroid/app/Activity;

    const/4 v2, 0x0

    invoke-direct {v1, v0, v2}, Lcn/aduu/adsdk/AdView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    iput-object v1, p0, Lcom/adview/adapters/AduuAdapter;->adView:Lcn/aduu/adsdk/AdView;

    .line 49
    iget-object v0, p0, Lcom/adview/adapters/AduuAdapter;->adView:Lcn/aduu/adsdk/AdView;

    invoke-virtual {v0, p0}, Lcn/aduu/adsdk/AdView;->setAdViewListener(Lcn/aduu/adsdk/AdViewListener;)V

    .line 52
    iget-object v0, v8, Lcom/adview/AdViewLayout;->handler:Landroid/os/Handler;

    new-instance v1, Lcom/adview/AdViewLayout$ViewAdRunnable;

    iget-object v2, p0, Lcom/adview/adapters/AduuAdapter;->adView:Lcn/aduu/adsdk/AdView;

    invoke-direct {v1, v8, v2}, Lcom/adview/AdViewLayout$ViewAdRunnable;-><init>(Lcom/adview/AdViewLayout;Landroid/view/ViewGroup;)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    goto :goto_0

    .line 46
    :cond_3
    iget-object v0, p0, Lcom/adview/adapters/AduuAdapter;->ration:Lcom/adview/obj/Ration;

    iget-object v0, v0, Lcom/adview/obj/Ration;->key:Ljava/lang/String;

    iget-object v1, p0, Lcom/adview/adapters/AduuAdapter;->ration:Lcom/adview/obj/Ration;

    iget-object v1, v1, Lcom/adview/obj/Ration;->key2:Ljava/lang/String;

    move v6, v3

    invoke-static/range {v0 .. v6}, Lcn/aduu/adsdk/AdManager;->init(Ljava/lang/String;Ljava/lang/String;IIIIZ)V

    goto :goto_1
.end method

.method public onAdSwitch()V
    .locals 0

    .prologue
    .line 88
    return-void
.end method

.method public onReceiveFail(I)V
    .locals 3
    .parameter "code"

    .prologue
    .line 74
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v1

    sget-object v2, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v1, v2, :cond_0

    .line 75
    const-string v1, "AdView SDK v1.7.0"

    const-string v2, "aduu--onFailedToReceiveAd"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 77
    :cond_0
    iget-object v1, p0, Lcom/adview/adapters/AduuAdapter;->adView:Lcn/aduu/adsdk/AdView;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lcn/aduu/adsdk/AdView;->setAdViewListener(Lcn/aduu/adsdk/AdViewListener;)V

    .line 79
    iget-object v1, p0, Lcom/adview/adapters/AduuAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/adview/AdViewLayout;

    .line 80
    .local v0, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v0, :cond_1

    .line 85
    :goto_0
    return-void

    .line 83
    :cond_1
    iget-object v1, v0, Lcom/adview/AdViewLayout;->adViewManager:Lcom/adview/AdViewManager;

    invoke-virtual {v1}, Lcom/adview/AdViewManager;->resetRollover_pri()V

    .line 84
    invoke-virtual {v0}, Lcom/adview/AdViewLayout;->rotateThreadedPri()V

    goto :goto_0
.end method

.method public onReceiveSuccess()V
    .locals 3

    .prologue
    .line 57
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v1

    sget-object v2, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v1, v2, :cond_0

    .line 58
    const-string v1, "AdView SDK v1.7.0"

    const-string v2, "aduu--onReceiveAd"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 60
    :cond_0
    iget-object v1, p0, Lcom/adview/adapters/AduuAdapter;->adView:Lcn/aduu/adsdk/AdView;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lcn/aduu/adsdk/AdView;->setAdViewListener(Lcn/aduu/adsdk/AdViewListener;)V

    .line 63
    iget-object v1, p0, Lcom/adview/adapters/AduuAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/adview/AdViewLayout;

    .line 64
    .local v0, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v0, :cond_1

    .line 70
    :goto_0
    return-void

    .line 67
    :cond_1
    iget-object v1, v0, Lcom/adview/AdViewLayout;->adViewManager:Lcom/adview/AdViewManager;

    invoke-virtual {v1}, Lcom/adview/AdViewManager;->resetRollover()V

    .line 69
    invoke-virtual {v0}, Lcom/adview/AdViewLayout;->rotateThreadedDelayed()V

    goto :goto_0
.end method
